package com.aitaoxue.palx.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.aitaoxue.palx.db.SearchHistory.HistoryEntry;

public class SearchHistoryDBHelper extends SQLiteOpenHelper {

	public static final int DATABASE_VERSION = 1;
	public static final String DATABASE_NAME = "search.db";

	private static final String SQL_CREATE_ENTRIES = "create table "
			+ HistoryEntry.TABLE_NAME + "(" + HistoryEntry._ID
			+ " integer primary key," + HistoryEntry.COLUMN_CONTENT + " text,"
			+ HistoryEntry.COLUMN_TIME + " integer" + ")";

	public SearchHistoryDBHelper(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(SQL_CREATE_ENTRIES);
	}

	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
		// TODO Auto-generated method stub

	}

}
